<?php
    
    include('../classes/db.php');
    
    $user = new User();
    
    $user->province             = $_POST['province'];
    $user->city_municipality    = $_POST['city_municipality'];
    $user->first_name           = $_POST['first_name'];
    $user->middle_name          = $_POST['middle_name'];
    $user->last_name            = $_POST['last_name'];
    $user->sex                  = $_POST['sex'];
    $user->month                = $_POST['month'];
    $user->day                  = $_POST['day'];
    $user->year                 = $_POST['year'];
    $user->hospital_street      = $_POST['hospital_street'];
    $user->p_city_municipality  = $_POST['p_city_municipality'];
    $user->p_province           = $_POST['p_province'];
    $user->type_of_birth        = $_POST['type_of_birth'];
    $user->m_first_name         = $_POST['m_first_name'];
    $user->m_middle_name        = $_POST['m_middle_name'];
    $user->m_last_name          = $_POST['m_last_name'];
    $user->m_nationality        = $_POST['m_nationality'];
    $user->m_religion           = $_POST['m_religion'];
    $user->f_first_name         = $_POST['f_first_name'];
    $user->f_middle_name        = $_POST['f_middle_name'];
    $user->f_last_name          = $_POST['f_last_name'];
    $user->f_nationality        = $_POST['f_nationality'];
    $user->f_religion           = $_POST['f_religion'];
    
    if($user->register()){
        echo "Submited!";
    }

?>